<template>
    <div class="fe-phone">
        <div class="fe-phone-left"></div>
        <div class="fe-phone-center">
            <div class="fe-phone-top"></div>
            <div class="fe-phone-main pos_r">
                <div class="phone-container pos_r">
                    <iframe :src="url"></iframe>
                </div>
            </div>
            <div class="fe-phone-bottom" style="overflow:hidden;">
                <div
                    style="height:52px; width: 52px; border-radius: 52px; margin:20px 0px 0px 159px; cursor: pointer;"
                    data-dismiss="modal"
                    aria-hidden="true"
                    title="点击关闭"
                    @click="closeDialog"
                ></div>
            </div>
        </div>
        <div class="fe-phone-right"></div>
    </div>
</template>

<script>
export default {
    props:{
        url: {
            type: String,
            default: ""
        }
    },
    data() {
        return {};
    },
    methods: {
        closeDialog() {
            this.$emit("childCloseDialog");
        }
    }
};
</script>

<style scoped>
.fe-phone {
    min-height: 775px;
    width: 383px;
    margin: 0 auto;
}
.fe-phone-left {
    height: 293px;
    width: 5px;
    background: url("../../static/iphone/phone_left.png") 0px 88px no-repeat;
    float: left;
}
.fe-phone-center {
    height: auto;
    width: 372px;
    float: left;
}
.fe-phone-top {
    height: 83px;
    width: 372px;
    background: url("../../static/iphone/phone_top.png") 0px 0px no-repeat;
}
.fe-phone-main {
    min-height: 600px;
    width: 372px;
    background: url("../../static/iphone/phone_center.png") 0px 0px repeat-y;
    padding: 0px 15px;
    box-sizing: border-box;
}
.fe-phone-bottom {
    height: 92px;
    width: 372px;
    background: url("../../static/iphone/phone_bottom.png") 0px 0px no-repeat;
}
.fe-phone-right {
    height: 220px;
    width: 6px;
    background: url("../../static/iphone/phone_right.png") 0px 158px no-repeat;
    float: left;
}

.phone-container {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

.phone-container iframe {
    border: 0 none;
    width: 100%;
    height: 600px;
    overflow: auto;
    display: block;
}

.phone-container header {
    height: 68px;
    background: url("../../static/iphone/header.png") no-repeat;
    background-size: cover;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
}

.phone-container header label {
    color: #fff;
    font-size: 15px;
    text-align: center;
    position: relative;
    top: 33px;
}

.phone-container footer {
    height: 50px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e7e7eb;
}
</style>
